
TARGET = rdb

CC = gcc

INCLUDES = -I../include
LIBS = -L. -lrdb-1.0
CFLAGS = -O2
LINKFLAGS = -s

C_HEADERS = $(wildcard *.h)
C_SOURCES = $(wildcard *.c)
C_OBJS = $(patsubst %.c, %.o, $(C_SOURCES))

.c.o:
	$(CC) -c $(CFLAGS) $(INCLUDES) $<

all: $(C_OBJS)
	$(CC) $(LINKFLAGS) -o $(TARGET) $(LIBS) $^ 

clean:
	rm -f $(C_OBJS)
	rm -f $(TARGET)
